<!DOCTYPE html>
<style>
div {
  width: 10ch;
}
.nowrap {
  white-space: nowrap;
}
</style>
<div class="nowrap">1234567<wbr>7654321</div>
<div><span class="nowrap">1234567<wbr>7654321</span></div>
